package com.mengfly.ai.testcroseplatformproject

import androidx.compose.ui.Alignment
import androidx.compose.ui.graphics.painter.BitmapPainter
import androidx.compose.ui.res.loadImageBitmap
import androidx.compose.ui.res.useResource
import androidx.compose.ui.unit.DpSize
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.WindowPosition
import androidx.compose.ui.window.WindowState
import androidx.compose.ui.window.singleWindowApplication
import com.mengfly.ai.testcroseplatformproject.codeviewer.CodeMainView

fun main() = singleWindowApplication(
    title = "Code Viewer",
    state = WindowState(
        size = DpSize(800.dp, 600.dp),
        position = WindowPosition.Aligned(Alignment.Center),
    ),
    exitProcessOnExit = true,
    alwaysOnTop = true,
    icon = BitmapPainter(useResource("ic_launcher.png", ::loadImageBitmap))
) {
    CodeMainView()
}